package com.turing.post.cardmanagement.util;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 卡事件日志
 * 
 * @author ys
 * @date 2012-12-17
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "CARDEVENTLOG")
public class CardEventLog implements Serializable {

	/**
	 * 01-密码错误锁定
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_PWDERRLOCK = "01";
	/**
	 * 11-强行解除密码错误锁定
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_PWDERRUNLOCK = "11";
	/**
	 * 03-冻结
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_FREEZE = "03";
	/**
	 * 13-解除冻结
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_FREEZE_FREE = "13";
	/**
	 * 20–挂失换卡
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_LOSSED = "20";
	/**
	 * 21-换发新卡
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_CHANGE_CARD = "21";
	/**
	 * 22-正式挂失
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_CARD_LOSS = "22";
	/**
	 * 23-临时挂失
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_CARD_TEMP_LOSS = "23";
	/**
	 * 24-解挂失
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_CARD_UN_LOSS = "24";
	/**
	 * 30–补磁
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_MAGNETIC = "30";
	/**
	 * 40–变更卡种类
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_CHANGE_TYPE = "40";
	/**
	 * 41–登记或变更实名信息
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_CHANGE_OWNER = "41";
	/**
	 * 97-重置密码
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_RESET_PASSWORD = "97";
	/**
	 * 98-修改密码
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_CHANGE_PASSWORD = "98";
	/**
	 * 99-调整有效期
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_MODIFY_EXPIRED = "99";
	/**
	 * EE-卡余额MAC校验错
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_VERIFY_MAC_FAILED = "EE";
	/**
	 * 50-手工锁定
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_MANUAL_LOCK = "50";
	/**
	 * 51-手工解除锁定
	 */
	public final static String CARDEVENTLOG_EVENTTYPE_MANUAL_LOCK_FREE = "51";
	/**
	 * 主键-卡事件id
	 */
	private BigInteger cardEventId;
	/**
	 * 卡事件单号
	 */
	private String cardEventOrderSeq;
	/**
	 * 卡号
	 */
	private String cardNo;
	/**
	 * 卡种类id
	 */
	private BigInteger cardClassicId;
	/**
	 * 有效期
	 */
	private Date expired;
	/**
	 * 换发新卡号
	 */
	private String newCardNo;
	/**
	 * 新卡种类
	 */
	private BigInteger newClassicId;
	/**
	 * 新有效期
	 */
	private Date newExpired;
	/**
	 * 账务日期
	 */
	private Date tranDate;
	/**
	 * 发生时间
	 */
	private Date tranTime;
	/**
	 * 主帐号
	 */
	private BigInteger masterAccNo;
	/**
	 * 发卡商号
	 */
	private String issueCompanyNo;
	/**
	 * 机构号
	 */
	private String branchNo;
	/**
	 * 持卡人姓名
	 */
	private String cardHolder;
	/**
	 * 持卡人证件类型
	 */
	private BigInteger cardHolderIdType;
	/**
	 * 持卡人证件号
	 */
	private String cardHolderIdNo;
	/**
	 * 新持卡人姓名
	 */
	private String newHolder;
	/**
	 * 新持卡人证件类型
	 */
	private BigInteger newHolderIdType;
	/**
	 * 新持卡人证件号
	 */
	private String newHolderIdNo;
	/**
	 * 商户号
	 */
	private String merchantNo;
	/**
	 * 商户机构号
	 */
	private String merchantBranchNo;
	/**
	 * 商户流水号
	 */
	private String mrchSeqNo;
	/**
	 * 事件类型
	 */
	private String eventType;
	/**
	 * 卡余额
	 */
	private BigInteger balance = BigInteger.ZERO;
	/**
	 * 手续费
	 */
	private BigInteger fee = BigInteger.ZERO;
	/**
	 * 折扣手续费
	 */
	private BigInteger discountFee = BigInteger.ZERO;
	/**
	 * 实收手续费
	 */
	private BigInteger factFee;
	/**
	 * 卡内扣手续费
	 */
	private BigInteger cardFee;
	/**
	 * 现金手续费
	 */
	private BigInteger cashFee;
	/**
	 * 手续费折扣授权操作员
	 */
	private BigInteger authOperId;
	/**
	 * 账户子系统流水号
	 */
	private String accSeqNo;
	/**
	 * 操作员
	 */
	private BigInteger operId;
	/**
	 * 手续费率
	 */
	private BigInteger feeratio;
	/**
	 * 备注
	 */
	private String remark;
	
	/**
	 * (UNI,FK) 凭证种类ID int Not Null
	 */
	private BigInteger voucherId;
	/**
	 * (UNI) 凭证号 Varchar（40） Not Null
	 */
	private String voucherNo;

	@Column(name = "VOUCHERID", nullable = false)
	public BigInteger getVoucherId() {
		return voucherId;
	}
	
	public void setVoucherId(BigInteger voucherId) {
		this.voucherId = voucherId;
	}

	@Column(name = "VOUCHERNO", nullable = false)
	public String getVoucherNo() {
		return voucherNo;
	}

	public void setVoucherNo(String voucherNo) {
		this.voucherNo = voucherNo;
	}

	@Column(name = "balance", nullable = false)
	public BigInteger getBalance() {
		return balance;
	}

	public void setBalance(BigInteger balance) {
		this.balance = balance;
	}

	@Column(name = "fee", nullable = false)
	public BigInteger getFee() {
		return fee;
	}

	public void setFee(BigInteger fee) {
		this.fee = fee;
	}

	@Column(name = "cashFee", nullable = false)
	public BigInteger getCashFee() {
		return cashFee;
	}

	public void setCashFee(BigInteger cashFee) {
		this.cashFee = cashFee;
	}

	@Column(name = "accSeqNo", nullable = true)
	public String getAccSeqNo() {
		return accSeqNo;
	}

	public void setAccSeqNo(String accSeqNo) {
		this.accSeqNo = accSeqNo;
	}

	@Column(name = "operId", nullable = true)
	public BigInteger getOperId() {
		return operId;
	}

	public void setOperId(BigInteger operId) {
		this.operId = operId;
	}

	@Column(name = "remark", nullable = true)
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "cardHolderIdNo", nullable = true)
	public String getCardHolderIdNo() {
		return cardHolderIdNo;
	}

	public void setCardHolderIdNo(String cardHolderIdNo) {
		this.cardHolderIdNo = cardHolderIdNo;
	}

	@Id
	@Column(name = "cardEventId", nullable = false)
	public BigInteger getCardEventId() {
		return cardEventId;
	}

	public void setCardEventId(BigInteger cardEventId) {
		this.cardEventId = cardEventId;
	}

	@Column(name = "cardEventOrderSeq", nullable = false)
	public String getCardEventOrderSeq() {
		return cardEventOrderSeq;
	}

	public void setCardEventOrderSeq(String cardEventOrderSeq) {
		this.cardEventOrderSeq = cardEventOrderSeq;
	}

	@Column(name = "cardNo", nullable = false)
	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	@Column(name = "cardClassicId", nullable = false)
	public BigInteger getCardClassicId() {
		return cardClassicId;
	}

	public void setCardClassicId(BigInteger cardClassicId) {
		this.cardClassicId = cardClassicId;
	}

	@Column(name = "expired", nullable = true)
	public Date getExpired() {
		return expired;
	}

	public void setExpired(Date expired) {
		this.expired = expired;
	}

	@Column(name = "newCardNo", nullable = true)
	public String getNewCardNo() {
		return newCardNo;
	}

	public void setNewCardNo(String newCardNo) {
		this.newCardNo = newCardNo;
	}

	@Column(name = "newClassicId", nullable = true)
	public BigInteger getNewClassicId() {
		return newClassicId;
	}

	public void setNewClassicId(BigInteger newClassicId) {
		this.newClassicId = newClassicId;
	}

	@Column(name = "newExpired", nullable = true)
	public Date getNewExpired() {
		return newExpired;
	}

	public void setNewExpired(Date newExpired) {
		this.newExpired = newExpired;
	}

	@Column(name = "tranDate", nullable = false)
	public Date getTranDate() {
		return tranDate;
	}

	public void setTranDate(Date tranDate) {
		this.tranDate = tranDate;
	}

	@Column(name = "tranTime", nullable = false)
	public Date getTranTime() {
		return tranTime;
	}

	public void setTranTime(Date tranTime) {
		this.tranTime = tranTime;
	}

	@Column(name = "masterAccNo", nullable = false)
	public BigInteger getMasterAccNo() {
		return masterAccNo;
	}

	public void setMasterAccNo(BigInteger masterAccNo) {
		this.masterAccNo = masterAccNo;
	}

	@Column(name = "issueCompanyNo", nullable = false)
	public String getIssueCompanyNo() {
		return issueCompanyNo;
	}

	public void setIssueCompanyNo(String issueCompanyNo) {
		this.issueCompanyNo = issueCompanyNo;
	}

	@Column(name = "branchNo", nullable = true)
	public String getBranchNo() {
		return branchNo;
	}

	public void setBranchNo(String branchNo) {
		this.branchNo = branchNo;
	}

	@Column(name = "cardHolder", nullable = true)
	public String getCardHolder() {
		return cardHolder;
	}

	public void setCardHolder(String cardHolder) {
		this.cardHolder = cardHolder;
	}

	@Column(name = "cardHolderIdType", nullable = true)
	public BigInteger getCardHolderIdType() {
		return cardHolderIdType;
	}

	public void setCardHolderIdType(BigInteger cardHolderIdType) {
		this.cardHolderIdType = cardHolderIdType;
	}

	@Column(name = "newHolder", nullable = true)
	public String getNewHolder() {
		return newHolder;
	}

	public void setNewHolder(String newHolder) {
		this.newHolder = newHolder;
	}

	@Column(name = "newHolderIdType", nullable = true)
	public BigInteger getNewHolderIdType() {
		return newHolderIdType;
	}

	public void setNewHolderIdType(BigInteger newHolderIdType) {
		this.newHolderIdType = newHolderIdType;
	}

	@Column(name = "newHolderIdNo", nullable = true)
	public String getNewHolderIdNo() {
		return newHolderIdNo;
	}

	public void setNewHolderIdNo(String newHolderIdNo) {
		this.newHolderIdNo = newHolderIdNo;
	}

	@Column(name = "merchantNo", nullable = true)
	public String getMerchantNo() {
		return merchantNo;
	}

	public void setMerchantNo(String merchantNo) {
		this.merchantNo = merchantNo;
	}

	@Column(name = "merchantBranchNo", nullable = true)
	public String getMerchantBranchNo() {
		return merchantBranchNo;
	}

	public void setMerchantBranchNo(String merchantBranchNo) {
		this.merchantBranchNo = merchantBranchNo;
	}

	@Column(name = "mrchSeqNo", nullable = true)
	public String getMrchSeqNo() {
		return mrchSeqNo;
	}

	public void setMrchSeqNo(String mrchSeqNo) {
		this.mrchSeqNo = mrchSeqNo;
	}

	@Column(name = "eventType", nullable = false)
	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	@Column(name = "FEERATIO")
	public BigInteger getFeeratio() {
		return feeratio;
	}

	public void setFeeRatio(BigInteger feeratio) {
		this.feeratio = feeratio;
	}

	@Column(name = "DISCOUNTFEE")
	public BigInteger getDiscountFee() {
		return discountFee;
	}

	public void setDiscountFee(BigInteger discountFee) {
		this.discountFee = discountFee;
	}

	@Column(name = "FACTFEE")
	public BigInteger getFactFee() {
		return factFee;
	}

	public void setFactFee(BigInteger factFee) {
		this.factFee = factFee;
	}

	@Column(name = "CARDFEE")
	public BigInteger getCardFee() {
		return cardFee;
	}

	public void setCardFee(BigInteger cardFee) {
		this.cardFee = cardFee;
	}

	@Column(name = "AUTHOPERID")
	public BigInteger getAuthOperId() {
		return authOperId;
	}

	public void setAuthOperId(BigInteger authOperId) {
		this.authOperId = authOperId;
	}
}
